import Vue from "vue";
import VueRouter from "vue-router";
import MovieNav from "../views/MovieNav.vue";
import MovieHot from "../views/MovieHot.vue";
import MovieCinema from "../views/MovieCinema.vue";
import MoviePend from "../views/MoviePend.vue";
import MovieClassic from "../views/MovieClassic.vue";
import VideoView from "../views/VideoView.vue";
import FeedView from "../views/FeedView.vue";
import BuyTicket from "../views/BuyTicket.vue";
import CityView from "../views/CityView.vue";
import SearchView from "../views/SearchView.vue";
import ZhuCe from '../pages/register/ZhuCe.vue';
import inDex from '../pages/login/inDex.vue';
import inUser from '../pages/mine/inUser.vue';
import VideoTui from "../views/VideoTui.vue";
import VideoRe from "../views/VideoRe.vue";
import VideoYue from "../views/VideoYue.vue";
import VideoShuo from "../views/VideoShuo.vue";
import VideoJia from "../views/VideoJia.vue";
import VideoJue from "../views/VideoJue.vue";
import InforMation from "../views/InforMation.vue";
import PlayMov from "../views/PlayMov.vue";
import FeedVideo from "../views/FeedVideo.vue";
import TicketOffice from "../views/TicketOffice.vue";
import ChooseSeat from "../views/ChooseSeat.vue";
Vue.use(VueRouter);

const routes = [
  // {
  //   path: '/about',
  //   name: 'about',
  //   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  // }

  {
    path: "/",
    redirect: "/movie",
  },
  {
    path: "/movie",
    component: MovieNav,
    meta: { showMainNav: true },
    children: [
      {
        path: "",
        component: MovieHot,
        meta: { showMainNav: true },
      },
      {
        path: "cinema",
        component: MovieCinema,
        meta: { showMainNav: true },
      },
      {
        path: "pend",
        component: MoviePend,
        meta: { showMainNav: true },
      },
      {
        path: "classic",
        component: MovieClassic,
        meta: { showMainNav: true },
      },
    ],
  },

  
  {
    path: "/video",
    meta: { showMainNav: true },
    component: VideoView,
  
  children: [
      {
        path: "",
        component: VideoTui,
        meta: { showMainNav: true },
       
      },
      {
        path: "re",
        component: VideoRe,
        meta: { showMainNav: true },
      },
      {
        path: "yue",
        component: VideoYue,
        meta: { showMainNav: true },
      },
      {
        path: "shuo",
        component: VideoShuo,
        meta: { showMainNav: true },
      },
      {
        path: "jia",
        component: VideoJia,
        meta: { showMainNav: true },
      },
      {
        path: "jue",
        component: VideoJue,
        meta: { showMainNav: true },
      },
    ],
  },
  {
    path: "/feed",
    meta: { showMainNav: true },
    component: FeedView,
  },
  {
    path: "/me",
    component: inUser,
  },

  {
    path: "/city",
    component: CityView,
  },
  {
    path: "/buyticket",
    component: BuyTicket,
  },
  {
    path: "/search",
    component: SearchView,
  },
  // 详情
  
  {
    path: "/info/:id",
    component: InforMation,
  },
  // 视频点击
  
  {
    path: "/play",
    component: PlayMov,
  },
  // 小视频点击
  
  {
    path: "/feedvideo",
    component: FeedVideo,
  },
  
    // 注册
  {
    path: '/register',
    component: ZhuCe,
},
// 登录

{
  path: '/login',
  component: inDex,
},

{
  path: "/ticketoffice",
  component: TicketOffice,
},
{
  path: "/seat",
  component: ChooseSeat,
},

];

const router = new VueRouter({
  routes,
});

export default router;
